#ifndef __POJTASK_HEADER
#define __POJTASK_HEADER

#include "oj_task.h"
#include <string>

//根据submit时的form data定义字段
struct PojTask: public OjTask {
	std::string problem_id;
	std::string language;
	std::string source;
	std::string submit;
	void *user_data;		//附带数据，默认为NULL

	// submit字段是固定的
	PojTask(const char *sock, const char *oj, const char *pid, 
		const char *lan, const char *src, void *data = NULL): 
		OjTask(sock, oj), problem_id(pid), language(lan), source(src), 
		submit("Submit"), user_data(data) {}

	PojTask(std::string &sock, std::string &oj, std::string &pid, 
		std::string &lan, std::string &src, void *data = NULL):
		OjTask(sock, oj), problem_id(pid), language(lan), source(src),
		submit("Submit"), user_data(data) {}
};

#endif // __POJTASK_HEADER

